package com.lj.message.param;

import com.lj.message.entity.SysMessage;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

/**
 * <p>
 * 系统消息表 保存参数
 * </p>
 *
 * @author luojing
 * @since 2025-10-15 16:57:29
 */
@Data
@Schema(description = "系统消息表 保存参数")
@Builder
public class SysMessageSaveParam {

    @Schema(description = "目标id")
    private Long targetId;

    @Schema(description = "消息标题")
    private String title;

    @Schema(description = "消息内容")
    private String content;

    public SysMessage toEntity() {
        SysMessage entity = new SysMessage();
        entity.setTargetId(targetId);
        entity.setTitle(title);
        entity.setContent(content);
        entity.setMarkRead(false);
        return entity;
    }
}
